<!-- 我的 -->
<template>
	<view class="container">
		
		<view class="head">
			<image :src="userInfo?.headImg" mode=""></image>
			<view class="head-user-info">
				<view class="name">
					{{ userInfo?.nickname }}
				</view>
			<!-- 	<view class="phone">
					{{ userInfo.nickname }}
				</view> -->
			</view>
		</view>
		
		
		<view class="footer">
			<view class="item-1" @click="onNav('/view/user/patientList/index')">
				<image src="/static/icon/doctor.png" mode=""></image> 
				<view>就诊人</view>
			</view>
			<view class="item-1" @click="onNav('/view/recipe/index')">
				<image src="/static/icon/recipe.png " mode=""></image> 
				<view>取药</view>
			</view>
		</view>
		
		<view class="" style="border-radius: 30rpx;overflow: hidden;margin-top: 30rpx;">
			<uni-list>
				<uni-list-item title="门诊记录" link clickable @click="onNav('/view/register/registerLog/index')" ></uni-list-item>
				<uni-list-item title="帮助中心" link clickable @click="onNav('/view/user/helpCenter/index')" ></uni-list-item>
				<uni-list-item title="意见反馈" link clickable @click="onNav('/view/user/feedback/index')" ></uni-list-item>
				<uni-list-item title="关于我们" link clickable @click="onNav('/view/user/aboutUs/index')" ></uni-list-item>
			</uni-list>
		</view>
	
	</view>
</template>

<script setup>
	import { reactive, ref } from 'vue';
	import {onLoad} from "@dcloudio/uni-app";
	const userInfo = ref();
	onLoad(() => {
		userInfo.value = uni.getStorageSync('userInfo')
	})
	
	function onNav(url) {
		uni.navigateTo({
			url
		})
	}
</script>

<style lang="scss">
	page {
		background: #F5F6FA;
	}
	.container {
		padding: 0 50rpx;
	}
	.head {
		background-color: #FFF;
		border-radius: 30rpx;
		padding: 30rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		
		margin-top: 20rpx;
		
		image {
			width: 130rpx;
			height: 130rpx;
			border-radius: 100rpx;
		}
		.head-user-info {
			margin-left: 26rpx;
			
			.name {
				
				font-family: '思源黑体';
				font-size: 37rpx;
				font-weight: bold;
				color: #333333;
			}
			.phone {
				
				font-family: '思源黑体';
				font-size: 28rpx;
				color: #666666;
				margin-top: 40rpx;
			}
		}
		
	}
	
	.footer {
		display: flex;
		justify-content: space-between;
		align-items: center;
		
		margin-top: 30rpx;
		.item-1 {
			flex: 1;
			background-color: #fff;
			border-radius: 30rpx;
			padding: 40rpx 30rpx;
			
			display: flex;
			justify-content: center;
			align-items: center;
			
			
			image {
				width: 50rpx;
				height: 50rpx;
			}
			
			view {
				margin-left: 20rpx;
				font-family: '思源黑体';
				font-size: 34rpx;
				color: #333333;
			}
			
			&:last-child {
				margin-left: 30rpx;
			}
			
		}
	}
	.uni-list-item__content-title {
		font-size: 16px !important;
	}
	.uni-list-item__container {
		padding: 30rpx 18px !important;
	}
	
</style>